<template>
  <ul class="catagtory">
    <li
      v-for="v of $store.state.catagtory.list"
      :key="v.id"
      :class="{ select: v.id === $store.state.catagtory.curChannelId }"
      @click="$store.commit('catagtory/setCurChannelId', v.id)"
    >
      {{ v.name }}
    </li>
  </ul>
</template>

<script>
export default {
  name: 'Catagtory',
  created() {
    this.$store.dispatch('catagtory/getList')
  },
}
</script>
